home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicInternalFrameTitlePane$TitlePaneLayout.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.9 KB  |  56 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.Component;
  4. import java.awt.Container;
  5. import java.awt.Dimension;
  6. import java.awt.LayoutManager;
  7.  
  8. public class BasicInternalFrameTitlePane$TitlePaneLayout implements LayoutManager {
  9.    // $FF: synthetic field
  10.    private final BasicInternalFrameTitlePane this$0;
  11.  
  12.    public BasicInternalFrameTitlePane$TitlePaneLayout(BasicInternalFrameTitlePane var1) {
  13.       this.this$0 = var1;
  14.    }
  15.  
  16.    public void addLayoutComponent(String var1, Component var2) {
  17.    }
  18.  
  19.    public void layoutContainer(Container var1) {
  20.       int var2 = this.this$0.getWidth();
  21.       int var3 = var2 - 16 - 2;
  22.       this.this$0.menuBar.setBounds(2, 1, 16, 16);
  23.       if (this.this$0.frame.isClosable()) {
  24.          this.this$0.closeButton.setBounds(var3, 2, 16, 14);
  25.          var3 -= 16;
  26.       } else if (this.this$0.closeButton.getParent() != null) {
  27.          this.this$0.closeButton.getParent().remove(this.this$0.closeButton);
  28.       }
  29.  
  30.       if (this.this$0.frame.isMaximizable()) {
  31.          this.this$0.maxButton.setBounds(var3 - 2, 2, 16, 14);
  32.          var3 -= 18;
  33.       } else if (this.this$0.maxButton.getParent() != null) {
  34.          this.this$0.maxButton.getParent().remove(this.this$0.maxButton);
  35.       }
  36.  
  37.       if (this.this$0.frame.isIconifiable()) {
  38.          this.this$0.iconButton.setBounds(var3, 2, 16, 14);
  39.       } else if (this.this$0.iconButton.getParent() != null) {
  40.          this.this$0.iconButton.getParent().remove(this.this$0.iconButton);
  41.       }
  42.  
  43.    }
  44.  
  45.    public Dimension minimumLayoutSize(Container var1) {
  46.       return this.preferredLayoutSize(var1);
  47.    }
  48.  
  49.    public Dimension preferredLayoutSize(Container var1) {
  50.       return new Dimension(100, 18);
  51.    }
  52.  
  53.    public void removeLayoutComponent(Component var1) {
  54.    }
  55. }
  56.